<!DOCTYPE html>
<html lang="en" >
<head>
    <meta charset="UTF-8">
    <title>EventBind</title>
</head>
<body>
<div id="app" @click="addNum">
<!--按特定的键，触发事件-->
    <input @keyup.enter="handler" value="按回车触发"/>
</div>
<script src="../js/vue.js" ></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            num: 100
        },
        methods: {
            handler(){
                console.log('按键触发生效')
            }
        }
    })
</script>
</body>

</html>